package com.example.kt_temp.ui.components.video

import android.view.LayoutInflater
import androidx.compose.runtime.Composable
import androidx.compose.ui.viewinterop.AndroidView
import com.example.kt_temp.R
import com.tencent.rtmp.TXVodPlayer
import com.tencent.rtmp.ui.TXCloudVideoView

@Composable
fun VideoView(voidPlayer:TXVodPlayer) {
    AndroidView(factory = { context ->
        (LayoutInflater.from(context).inflate(R.layout.video,null,false)
            .findViewById(R.id.videoView) as TXCloudVideoView).apply {
            voidPlayer.setPlayerView(this)
        }
    })
}